#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    // 单个按钮设置样式，局部优先级高于全局
    //ui->pushButton->setStyleSheet("QPushButton { color: blue; }");

    // 设置指定控件样式
    ui->pushButton->setStyleSheet("QPushButton { font-size: 30px} ");
    // 全局方式设置
    //this->setStyleSheet("QPushButton { color: blue; }");

}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    ui->textEdit->setText("hello world");
}
